﻿@{
    var Datas =ViewBag.Datas;
    var Type = ViewBag.Type;
    var Max = ViewBag.Max;
    }
<style>
    .data-table {
        min-width: 98%;
        margin: 0 auto;
        text-align: center;
        font-family: 'Courier New';
    }

        .data-table th {
            background-color: #444;
            color: #eee;
            font-family: "Microsoft YaHei";
        }

        .data-table th, .data-table td {
            text-align: center;
            padding: 10px 0;
        }
</style>

<table class="data-table">
    <thead>
        <tr>
            <th>序号</th>
            @{
                for (var i = 0; i < Datas.Count; i++)
                {
                <th>@Datas[i].Title</th>
                }
            }
        </tr>
    </thead>
    <tbody>
        @{
            for (var i = 0; i < Max; i++)
            {
                <tr>
                    <td>@(i+1)</td>
                    @{
                foreach (var data in Datas)
                {
                    if (i < data.Count)
                    {
                        <td>@data.Items[i].Format(Type,ViewBag.Split)</td> 
                    }
                    else
                    {
                        <td></td> 
                    }
                }
                        }
                </tr>
            }
       
            }
    </tbody>
</table>


